Release 10.1A: OpenEdge Data Management:
SQL Development


Using the UPDATE statement

The UPDATE statement updates the rows and columns of the specified table with the given values for rows that satisfy the search_condition. The UPDATE statement uses the following syntax:

Syntax

UPDATE table_name 
  SET assignment [, assignment ] , ... 
  [ WHERE search_condition ] ; 

assignment:

Syntax
column = { expr | NULL } 
  | ( column [, column ] , ... ) = ( expr [, expr ] ) 
  | ( column [, column ] , ... ) = ( query_expression ) 

In Example 6–7, a simple UPDATE statement is used to revise the credit limit of all customers in the Customer table.

Example 6–7: UPDATE statement
UPDATE Customer  
    SET CreditLimit = 50000; 

Use the WHERE clause to identify a specific column and row to be updated, as shown in Example 6–8.

Example 6–8: UPDATE statement with WHERE clause
UPDATE Customer  
       SET CreditLimit = 50000 
       WHERE Name = 'World Cup Soccer'; 

For more information on the UPDATE statement, see OpenEdge Data Management: SQL Reference .


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095